import SQL from "../js/sql.js"
export default class Material {
    constructor() {
        this.name=''
        this.num=''
    }
    async selectNum(){
        this.num = await SQL.getSql().selectAllMaterial(this.name)
        return this.num
    }
    updateNum(num){
        SQL.getSql().updateAllMaterial(this.name,num)
    }
}

class Mask extends Material{
    constructor() {
        super();
        this.name='口罩'
        this.num=''
    }
}
class PreventionWorkers extends Material{
    constructor() {
        super();
        this.name='防疫人员'
        this.num=''
    }
}
class Disinfectant extends Material{
    constructor() {
        super();
        this.name='消毒水'
        this.num=''
    }
}
class Suit extends Material{
    constructor() {
        super();
        this.name='防护服'
        this.num=''
    }
}

var mask = new Mask()
var preventionWorkers = new PreventionWorkers()
var disinfectant = new Disinfectant()
var suit = new Suit()